package com.gossip;

import javax.management.NotificationListener;
import java.util.Date;


public class LocalGossipMember extends GossipMember {
	/** The timeout timer for this gossip member. */
	private transient GossipTimeoutTimer timeoutTimer;


	public LocalGossipMember(String name, String host, int port, Date heartbeat, NotificationListener notificationListener, int cleanupTimeout) {
		super(host, port, heartbeat, name);
		
		this.timeoutTimer = new GossipTimeoutTimer(cleanupTimeout, notificationListener, this);
	}

	/**
	 * Start the timeout timer.
	 */
	public void startTimeoutTimer() {
		this.timeoutTimer.start();
	}

	/**
	 * Reset the timeout timer.
	 */
	public void resetTimeoutTimer() {
		this.timeoutTimer.reset();
	}
}
